# -*- coding: utf-8 -*-
__author__ = 'alex'


class PageEntity(object):
    def __init__(self):
        self._id = None
        self._latest = None
        self._text = u""
        self._isInteresting = True
        self._isChecked = False

    def add(self, name, value):
        if name == u'id':
            if self._id is None:
                self._id = value
            else:
                self._latest = value
            return

        if name == u'text':
            self._text += value


    def __str__(self):
        #print self._id
        #print self._text
        if self._isInteresting:
            s = self._id + u"\n" + self._latest + u"\n" + self._text
        else:
            s = ''

        return s.encode('utf-8')
  #      return ""
